package com.prs.crm.dao.stock.impl;


import java.io.Serializable;

import org.hibernate.criterion.Example;

import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.dao.stock.PurchaseDao;
import com.prs.crm.domain.stock.Purchase;
import com.prs.crm.domain.stock.PurchaseDetail;

public class PurchaseDaoImpl extends BaseDaoImpl<Purchase> implements PurchaseDao {

	public void saveDetail(PurchaseDetail detail)
	{
		this.getHibernateTemplate().saveOrUpdate(detail);
	}
	
	public PurchaseDetail getDetail(java.io.Serializable id)
	{
		return this.getHibernateTemplate().get(PurchaseDetail.class, id);
	}

	@Override
	public void saveOrUpdate(PurchaseDetail purchaseDetail) {
		this.getHibernateTemplate().saveOrUpdate(purchaseDetail);
	}

	@Override
	public Purchase getPurchase(Serializable id) {
		
		return this.getHibernateTemplate().get(Purchase.class, id);
	}

	@Override
	public void saveOrUpdate(Purchase purchase) {
		this.getHibernateTemplate().saveOrUpdate(purchase);
	}

}
